<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Alumno</title>
    </h:head>
    <h:body>
        <f:event type="preRenderView" listener="#{alumnoBean.init()}" />
        <h:form prependId="false" >
            <label>Nombre:</label>
            <p:inputText value="#{alumnoBean.alumno.nombre}" /><br/>
            <label>Fecha Inicio:</label>
            <p:calendar value="#{alumnoBean.alumno.fechaInicio}" /><br/>
            <p:commandButton value="Guardar" action="#{alumnoBean.save()}" ajax="false" rendered="#{alumnoBean.edit}"/>
            <p:commandButton value="Agregar" action="#{alumnoBean.insert()}" ajax="false" rendered="#{alumnoBean.add}"/>
            <p:messages />
        </h:form>
    </h:body>
</html>